package cn.broadmax.boot.modules.aj.bean;

import cn.broadmax.boot.modules.aj.entity.Record;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jexx.util.StringUtil;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@ApiModel(value="ajRecord分页查询请求", description="ajRecord分页查询")
public class showSearch {

    @ApiModelProperty(value = "办案部门")
    private String department;


    public static LambdaQueryWrapper<Record> createWrap(showSearch search){
        LambdaQueryWrapper<Record> wrapper = new LambdaQueryWrapper<>();
        if(search != null){
            if(StringUtil.hasText(search.getDepartment())){
                wrapper.like(Record::getDepartment, search.getDepartment());
            }
        }
        return wrapper;
    }

}
